import React from "react";
import { IndexBar, List } from "antd-mobile";
import { useParams } from "react-router-dom";
import { sousuolishi } from "../../../qie/slice/ticket";
import { useDispatch } from "react-redux";
function Sousuo(props) {
  const params = useParams();
  const { list, dianji } = props;
  const disp = useDispatch();
  return (
    <div>
      {list.map((item, index) => {
        return (
          <List.Item
            key={index}
            onClick={() => {
              disp(sousuolishi(item.name));
              dianji(params.type, item.name);
              
            }}
          >
            {item.name}
          </List.Item>
        );
      })}
    </div>
  );
}

export default Sousuo;
